package org.example.designPattern.observerPattern8;

// 具体观察者
public class ObserverImpl implements Observer {
    // 具体观察者的属性
    private int myState;

    public void update(int state) {
        myState = state;
        System.out.println("收到消息,myState值改为：" + state);
    }

    public int getMyState() {
        return myState;
    }
}